<?php

class Truetrader
{
  static public function getRatioClass($ratio)
  {
    if ($ratio > 1)
      return 'neg_ratio';
    else
      return 'pos_ratio';
  }

  static public function getHorizonImage($horizon)
  {
    if
    (
            ($horizon == TradeHorizon::SECOND) ||
            ($horizon == TradeHorizon::MINUTE)
    )
      return 'red_clock.png';
    else
    if
    (
            ($horizon == TradeHorizon::WEEK) ||
            ($horizon == TradeHorizon::MONTH) ||
            ($horizon == TradeHorizon::YEAR)
    )
      return 'green_clock.png';
    else
      return 'clock.png';
  }

  static public function setYearDate($year)
  {
    return ($year != null) ? array('started' => array('day' => 1, 'month' => 1, 'year' => $year)) : array();
  }
}
